// Compact mode ----------------------------------------------

@theme-layoutmode: ~'theme-@{ui-theme-name}-layoutmode';

// Default
html { font-size: @font-size; }


// Large screen (>= 27")
@media (min-width: 2560px) {
  [@{theme-layoutmode}="auto"] { font-size: @font-size + 2px; }
}

// Medium screen (>= 20")
@media (min-width: 1920px) {
  [@{theme-layoutmode}="auto"] { font-size: @font-size + 1px; }
}

// Small screen (<= 13")

.compact-mode() {
  font-size: @font-size - 1px;

  atom-workspace {
    padding-right: 0;
    atom-panel-container.left:empty {
      padding-left: 0;
    }
  }

  atom-pane-container {
    atom-pane {
      padding-top: 0;
      padding-right: 0;
      border-left: 1px solid @base-border-color;
      border-bottom: 1px solid @base-border-color;
      .item-views {
        border: none;
      }
    }
    // make resize-handles fill the space
    atom-pane-axis.horizontal > atom-pane-resize-handle {
      width: 8px;
      margin-left: -4px;
    }
    atom-pane-axis.vertical > atom-pane-resize-handle {
      height: 8px;
      margin-top: -4px;
    }
  }

  .tab-bar {
    .tab::before {
      border-radius: 0;
      top: 0;
      left: 0;
      bottom: 0;
    }
    .tab::after {
      border-top: none;
      border-radius: 0;
    }
    .tab:first-of-type::after {
      border-left: none;
    }
    .tab:last-of-type::after {
      border-right: none;
      box-shadow: inset 0 1px 1px hsla(0,0%,100,.06), 1px 0 0 @base-border-color;
    }
  }


  // tree-view
  .tree-view-resizer[data-show-on-right-side="true"] {
    border-left: 1px solid @base-border-color;
  }

  .tree-view::before {
    top: 0;
  }

  .tree-view .project-root.project-root {
    padding-top: 0;
    &:before {
      height: @ui-tab-height;
    }
  }
  .theme-ghoulish-ui .tree-view .project-root.project-root::before {
    border-top: none;
  }
}

[@{theme-layoutmode}="compact"] {
  .compact-mode();
}

@media (max-width: 1280px), (max-height: 800px) {
  [@{theme-layoutmode}="auto"] {
    .compact-mode();
  }
}
